package day03.lianxi.duotai;

public class Lian05 {
    public static void main(String[] args) {
        Fruit a=new Apple();
        run(a);

    }
    public static void run(Fruit a){
        a.zz();
    }
}
  abstract class Fruit{
    public void zz(){

    }
}
class Apple extends Fruit{
    public void zz(){
        System.out.println("苹果");
    }
}
class Orange extends Fruit{
    public void zz(){
        System.out.println("橘子");
    }
}
